#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int h = 0;
	float r = 0;
	scanf("%d%*c%f", &h, &r);
	float a = 3.14f;
	float b = 2 * a * r;
	float c = a * r * r;
	float d = 4 * a * r * r;
	double e = (3.0 / 4) * a * r * r * r;
	double f = (1.0 / 3) * c * h;
	printf("%.2f\n%.2f%\n%.2f\n%.2f\n%.2f", b, c, d, e, f);






	return 0;
}